ROOT_DIR    = $(shell pwd)
NAMESPACE   = "default"
DEPLOY_NAME = "template-single"
DOCKER_NAME = "template-single"
ADMIN_RESOURCE_PATH = "/resource/public/admin/"
# 测试服务器
DEVBINPath = root@34.97.126.105:/www/wwwroot/CRSSERVER
DEVPassword = rP6pB7xJ6qK6yN2a
# 生产服务器
BINPath = root@34.97.71.204:/www/wwwroot/CRSSERVER
Password = NndqPGCtkd9QyIf4

sync:
	./push.expect $(Password) ../bin/APT11 $(BINPath)
syncDev:
	./push.expect $(DEVPassword) ../bin/APT11 $(DEVBINPath)
# 一键编译。编译web前端，并将编译后的包移动到服务端对应静态资源路径下，最后编译服务端
.PHONY: build
build:
	CGO_ENABLED=0 GOOS=linux  GOARCH=amd64  go build -trimpath -ldflags "-s -w" -o ../bin/APT11 ./main.go